X-Git-Url: http://git.cyclocoop.org//%22http:/%22.attribut_html%28%24lesurls%5B%24numero%5D%29.%22/%22?a=blobdiff_plain;f=includes%2FLinker.php;h=f4131ed40fcb23ecd524a1f2fe431273d250e8d7;hb=f8cc99ea9885103ed4ee23b83efc003d24c98450;hp=20ff09d345f3c4a64f67c57b6341c0317e26c92a;hpb=a5c5795c74a06d4ebdbe3384ef93e0084b74c46b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Linker.php b/includes/Linker.php index 20ff09d345..f4131ed40f 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -269,7 +269,7 @@ class Linker { */ public static function linkKnown( $target, $html = null, $customAttribs = [], - $query = [], $options = [ 'known', 'noclasses' ] + $query = [], $options = [ 'known' ] ) { return self::link( $target, $html, $customAttribs, $query, $options ); } @@ -940,7 +940,15 @@ class Linker { $redir = RepoGroup::singleton()->getLocalRepo()->checkRedirect( $title ); if ( $redir ) { - return self::linkKnown( $title, $encLabel, [], wfCgiToArray( $query ) ); + // We already know it's a redirect, so mark it + // accordingly + return self::link( + $title, + $encLabel, + [ 'class' => 'mw-redirect' ], + wfCgiToArray( $query ), + [ 'known', 'noclasses' ] + ); } $href = self::getUploadUrl( $title, $query ); @@ -950,7 +958,7 @@ class Linker { $encLabel . ''; } - return self::linkKnown( $title, $encLabel, [], wfCgiToArray( $query ) ); + return self::link( $title, $encLabel, [], wfCgiToArray( $query ), [ 'known', 'noclasses' ] ); } /**